home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / CED10E.ARJ / CED.DOC < prev   
Text File  |  1991-07-24  |  91KB  |  2,377 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                               ==========================
  27.                                CED - DOS Command Editor
  28.                                      User's Guide
  29.                                      Version 1.0E
  30.                               ==========================
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                             Copyright (c) 1985, 1986, 1991
  38.                                The Cove Software Group
  39.                                  Post Office Box 1072
  40.                                   Columbia, MD 21044
  41.                                     (301) 992-9371
  42.  
  43.                                 CompuServe: 76703,2002
  44.                          Internet: 76703.2002@compuserve.com
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.                                        Contents
  53.  
  54.                  Purpose . . . . . . . . . . . . . . . . . . . .   1
  55.                  System Requirements . . . . . . . . . . . . . .   1
  56.                  Terminology . . . . . . . . . . . . . . . . . .   2
  57.                  Installation  . . . . . . . . . . . . . . . . .   2
  58.                  Command line editor . . . . . . . . . . . . . .   3
  59.                  DOS command stack . . . . . . . . . . . . . . .   6
  60.                  Application program command stack . . . . . . .   8
  61.                  PCALL function  . . . . . . . . . . . . . . . .   8
  62.                  Synonyms  . . . . . . . . . . . . . . . . . . .   9
  63.                  User program synonyms . . . . . . . . . . . .    10
  64.                  Compound synonyms . . . . . . . . . . . . . .    10
  65.                  Command parameters  . . . . . . . . . . . . .    13
  66.                  Ignoring commands . . . . . . . . . . . . . .    14
  67.                  Ignoring individual commands  . . . . . . . .    15
  68.                  Clearing CED objects  . . . . . . . . . . . .    15
  69.                  Configuration files . . . . . . . . . . . . .    16
  70.                  Changing default buffer sizes . . . . . . . .    17
  71.                  Status display  . . . . . . . . . . . . . . .    19
  72.                  Multiple definitions  . . . . . . . . . . . .    19
  73.                  Problem determination . . . . . . . . . . . .    19
  74.                  Appendix A: Command summary . . . . . . . . .    22
  75.                  Appendix B: Order of Processing . . . . . . .    24
  76.                  Appendix C: Limitations . . . . . . . . . . .    25
  77.                  Appendix D: Version History . . . . . . . . .    26
  78.                  Appendix E: PCED (the commercial version) . .    27
  79.                  Appendix F: Ordering PCED . . . . . . . . . .    31
  80.                  Appendix G: User-installed commands . . . . .    32
  81.                  Appendix H: User Command Demo . . . . . . . .    35
  82.                  COPYRIGHT/LICENSE/WARRANTY  . . . . . . . . .    37
  83.  
  84.  
  85.  
  86.  
  87.  
  88.             Purpose
  89.             -------
  90.  
  91.             CED (which stands for Command EDitor) provides the following
  92.             functions at the DOS prompt, or from within certain application
  93.             programs:
  94.  
  95.                  -- Improved command line editing facility.
  96.  
  97.                  -- Recall of previously issued commands for re-entry.
  98.  
  99.                  -- Command synonyms, which may include "chaining" of a
  100.                  series of commands.
  101.  
  102.                  -- Parameterization of synonym commands.
  103.  
  104.                  -- Recall of parameters for previously issued commands.
  105.  
  106.                  -- User-settable buffer sizes for all functions.
  107.  
  108.                  -- For programmers, a facility to add new "resident"
  109.                  commands to the DOS shell.
  110.  
  111.             CED is a copyrighted but free program that was initially released
  112.             in 1985.  Please see the copyright/license section at the end of
  113.             this manual for information about how you may use CED.
  114.  
  115.             The Cove Software Group also publishes a commercial product
  116.             called PCED (Professional CED).  PCED is a highly enhanced retail
  117.             version of CED.  Please see Appendices E and F for information
  118.             about PCED.
  119.  
  120.             Neither CED nor PCED is a shareware product.  CED is free for
  121.             your personal use (with restrictions as described in the
  122.             license), and PCED is a commercial, for-sale program.
  123.  
  124.  
  125.             System Requirements
  126.             -------------------
  127.  
  128.             CED requires an IBM PC, XT, AT, PCJr, PS/2, or true compatible.
  129.             There are no special hardware requirements.
  130.  
  131.             CED requires DOS Version 2.00 or later.  It increases the size of
  132.             resident DOS by about 16K bytes when installed.  Most of this
  133.             space is, however, used for data storage, and the amount of
  134.             storage can be reduced.  Thus, smaller versions of CED are
  135.             possible.
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.                                  CED 1.0 User's Guide - 1
  145.  
  146.  
  147.  
  148.  
  149.  
  150.             Terminology
  151.             -----------
  152.  
  153.             The term "DOS command" refers to anything that is typed at the
  154.             DOS prompt OR at the prompt of a CED-compatible program such as
  155.             DEBUG.
  156.  
  157.             The term "CED command" refers to a command that is specifically
  158.             directed to CED itself.  These are used to define command
  159.             synonyms, adjust facets of CED's operation, etc.  CED commands
  160.             always begin with the word "CED" and must be either (a) typed at
  161.             a command prompt, or (b) issued in a special configuration file.
  162.             CED commands cannot be used in batch files.
  163.  
  164.             Keyboard key names are as follows:
  165.  
  166.             <Up>           The up-arrow key on the numeric keypad.
  167.             <Down>         The down-arrow key on the numeric keypad.
  168.             <Left>         The left-arrow key on the numeric keypad.
  169.             <Right>        The right-arrow key on the numeric keypad.
  170.             <Backspace>    The large left-arrow key, next to NumLock.
  171.  
  172.             A caret (^) means to press the Ctrl key in conjunction with a
  173.             named key; for example, <^End> means "press and hold the Ctrl
  174.             key, then press <End>".
  175.  
  176.             Words in CAPS are CED keywords and must be typed exactly as shown
  177.             (they need not be capitalized when you use them).
  178.  
  179.             Words in [brackets] are optional elements of a command.
  180.  
  181.  
  182.             Installation
  183.             ------------
  184.  
  185.             Installation (in its simplest form) is accomplished by typing
  186.             "CED" at the DOS prompt, or including the statement "CED" in your
  187.             AUTOEXEC.BAT file.  There are optional parameters when installing
  188.             CED; these will be covered later.
  189.  
  190.             After CED is installed, everything will appear to be normal, but
  191.             you now have many new features when entering DOS commands.  The
  192.             remainder of this document will describe these features.
  193.  
  194.             CED is active either at the DOS prompt, or when an application
  195.             program requests buffered keyboard input from DOS (DOS function
  196.             0AH).  There are a few such programs (DEBUG and EDLIN are two);
  197.             but the main use of CED is at the DOS prompt.
  198.  
  199.             Once CED has been installed, the command "CED" becomes, in
  200.             effect, an internal DOS command.  Thus, when you want to issue
  201.             CED commands (as explained below), you will type "CED <command>",
  202.             but the program file (CED.COM) need NOT be available on disk.
  203.             CED becomes fully memory resident and is an extension to DOS
  204.  
  205.  
  206.                                  CED 1.0 User's Guide - 2
  207.  
  208.  
  209.  
  210.  
  211.  
  212.             after installation.  In particular, this means that you should
  213.             NOT include a drive or path in issuing CED commands after initial
  214.             installation.  A command like "C:CED SYN d dir" will reload CED
  215.             from disk and you'll get a message indicating that CED is already
  216.             loaded.
  217.  
  218.             Because CED is active only at the DOS prompt and at the prompts
  219.             of compatible programs like DEBUG, you cannot use CED services in
  220.             batch files.  In particular, neither CED commands nor synonyms
  221.             can be used in batch files.  If you use CED commands in a batch
  222.             file, the program will be reloaded from disk and you'll receive a
  223.             message indicating that CED is already loaded.  Note, however,
  224.             that you CAN issue a series of CED commands from a configuration
  225.             file (q.v.).
  226.  
  227.  
  228.             Command line editor
  229.             -------------------
  230.  
  231.             CED provides a new "editor" for DOS commands.  You will use this
  232.             editor whenever you type a DOS command, or when you enter data to
  233.             a compatible program such as DEBUG.  CED's editor replaces all of
  234.             the DOS editing keys, including F1-F5.
  235.  
  236.             There are two big differences between the CED editor and the DOS
  237.             editor.  First, the CED editor always allows you to see all of
  238.             your data; where the DOS editor likes to "hide" characters, the
  239.             CED editor always displays all of the characters that it is
  240.             using.  Second, the CED editor allows you to move the cursor
  241.             around within a command, which makes correcting and altering
  242.             commands much easier.  The keystrokes that CED uses for editing
  243.             are very similar to those used by many word processors and text
  244.             editors; you will find command entry and editing to be much more
  245.             natural than with the DOS editor.
  246.  
  247.  
  248.             OVERTYPE AND INSERT MODES
  249.  
  250.             The CED editor had two basic modes: the overtype mode and the
  251.             insert mode.  In overtype mode (the normal mode), anything you
  252.             type will add to or replace the text currently displayed.  In
  253.             insert mode, anything you type will be inserted into the text at
  254.             the current cursor position, moving any characters to the right
  255.             of the cursor out of the way.  The <Ins> key toggles between
  256.             typeover and insert modes.
  257.  
  258.             To demonstrate this, type some text at the DOS prompt, then use
  259.             the left-arrow key to move the cursor into the text you just
  260.             entered (note that the text is not erased; the arrow key simply
  261.             moves the cursor).  Now type a few characters and observe that
  262.             they replace the text already there; this is overtype.  Now press
  263.             the <Ins> key once to enter insert mode (note that the cursor
  264.             changes size to let you know that you're in insert mode), and
  265.             type some more text.  Note that the new text is inserted into
  266.  
  267.  
  268.                                  CED 1.0 User's Guide - 3
  269.  
  270.  
  271.  
  272.  
  273.  
  274.             your "command", and the remaining text is moved right, out of the
  275.             way.  Press <Esc> to erase the command completely.
  276.  
  277.             CED normally begins in overtype mode.  If you wish, you can have
  278.             it start in insert mode by typing the CED command
  279.  
  280.                  CED INSMODE ON
  281.  
  282.             To revert to the default overtype mode, type
  283.  
  284.                  CED INSMODE OFF
  285.  
  286.  
  287.             CURSOR MOVEMENT KEYS
  288.  
  289.             CED uses the following keys to move the cursor around within the
  290.             command you are typing:
  291.  
  292.             <Home>              Moves the cursor to the "home" position, that
  293.                                 is, to the first character.
  294.  
  295.             <End>               Moves the cursor to the end position (follow-
  296.                                 ing the last character displayed).
  297.  
  298.             <Left>              Moves the cursor left one character.  This
  299.                                 does not erase any characters; it simply
  300.                                 moves the cursor.  Remember that <Left> is
  301.                                 the left-arrow key on the numeric keypad (key
  302.                                 4), not the backspace key (the larger left
  303.                                 arrow next to NumLock).
  304.  
  305.             <Right>             Moves the cursor right one character.
  306.  
  307.             <^Left>             Moves the cursor left one word.  A "word" is
  308.                                 any sequence of characters bounded a space or
  309.                                 any of the following characters:
  310.  
  311.                                   : \ ; , < > | = " + [ ]
  312.  
  313.                                 The cursor will be placed on the first
  314.                                 character of the previous "word".
  315.  
  316.             <^Right>            Moves the cursor right one word; it will be
  317.                                 placed on the first character of the next
  318.                                 word.
  319.  
  320.  
  321.             TEXT DELETION KEYS
  322.  
  323.             You can use the following CED editor keys to delete text:
  324.  
  325.             <Del>               Deletes the character at the cursor position.
  326.  
  327.  
  328.  
  329.  
  330.                                  CED 1.0 User's Guide - 4
  331.  
  332.  
  333.  
  334.  
  335.  
  336.             <Backspace>         Deletes the character to the left of the
  337.                                 cursor position, and moves the cursor left.
  338.                                 This is known as a destructive backspace; it
  339.                                 is exactly equivalent to keying <Left>
  340.                                 followed by <Del>.
  341.  
  342.             <^End>              Deletes all characters from the cursor
  343.                                 position to end of the command.
  344.  
  345.             <^Home>             Deletes all characters from the home position
  346.                                 (first character) to the cursor position, not
  347.                                 including the character at the cursor
  348.                                 position.
  349.  
  350.             <Esc>               Cancel: erases the command completely and
  351.                                 allows you to start over.
  352.  
  353.  
  354.             COPYING FROM TEMPLATE (EDLIN)
  355.  
  356.             When DOS or user programs such as EDLIN request input from CED,
  357.             they provide it with an input "template".  In almost all cases,
  358.             this template is a copy of the last command entered.  The
  359.             template is the data that is used by the DOS editing keys
  360.             (<F1>-<F5>, etc.).
  361.  
  362.             CED users will not need this template very often, because the
  363.             command stack (described below) provides a similar but much more
  364.             powerful function.  There are a few cases, however, when the
  365.             template will be useful; the most important of these is seen in
  366.             the DOS line editor, EDLIN.  If you do not use EDLIN, this topic
  367.             will probably not be of interest to you.
  368.  
  369.             When you are editing a previously entered line (by typing the
  370.             line number at the EDLIN prompt), EDLIN places a copy of the line
  371.             to be edited into the template.  In order to allow you to edit
  372.             the template directly, CED uses <F3> to copy the contents of the
  373.             template to the screen for editing.  This is very similar in
  374.             effect to <F3> as used by DOS.  So, when you want to edit an
  375.             Edlin text line, type the line number, followed by <F3>.  This is
  376.             an example EDLIN session:
  377.  
  378.                  C> edlin test
  379.                  End of input file
  380.                  *1,3L
  381.                       1:*This is line 1
  382.                       2: This is line 2
  383.                       3: This is line 3
  384.                  *2
  385.                       2:*This is line 2
  386.                       2:*_
  387.  
  388.  
  389.  
  390.  
  391.  
  392.                                  CED 1.0 User's Guide - 5
  393.  
  394.  
  395.  
  396.  
  397.  
  398.             At this point, the text "This is line 2" is in the template, but
  399.             it is not displayed.  To display the text and allow it to be
  400.             edited, just press <F3>, and the screen will appear as follows:
  401.  
  402.                  C> edlin test
  403.                  End of input file
  404.                  *1,3L
  405.                       1:*This is line 1
  406.                       2: This is line 2
  407.                       3: This is line 3
  408.                  *2
  409.                       2:*This is line 2
  410.                       2:*This is line 2_
  411.  
  412.             As you can see, <F3> performs approximately as it would under the
  413.             DOS command editor.
  414.  
  415.             <F3> is available any time CED is active, but, in most cases, it
  416.             will simply redisplay the last command entered.
  417.  
  418.  
  419.             DOS command stack
  420.             -----------------
  421.  
  422.             CED keeps a record of each command you enter.  You can retrieve
  423.             and re-enter these commands by using the <Up> and <Down> keys to
  424.             display the old commands, then pressing <Enter> when the desired
  425.             command is displayed (the command can be edited, of course).
  426.  
  427.             You can visualize the stored data as a "stack" of commands.  CED
  428.             keeps a pointer to somewhere in this stack.  The pointer always
  429.             points to a location "between" two commands; when you press <Up>,
  430.             CED displays the command "above" the pointer, then moves the
  431.             pointer up one command.  When you press <Down>, CED displays the
  432.             command "below" the pointer, then moves the pointer down one
  433.             command.
  434.  
  435.             For example, suppose you have entered commands A, B, and C. The
  436.             stack will appear as follows:
  437.  
  438.                                 +-------------+
  439.                                 |      A      |
  440.                                 +-------------+
  441.                                 |      B      |
  442.                                 +-------------+
  443.                                 |      C      |
  444.                                 +-------------+  <-- pointer
  445.  
  446.             The stack is circular in nature; thus, if the pointer points
  447.             "below" the last command in the stack (as it does above), it is
  448.             actually between the last command (C) and the first command (A).
  449.             In the situation above, pressing <Up> will display command C and
  450.             leave the pointer between B and C.  Pressing <Down> will display
  451.             command A, and leave the pointer between A and B.
  452.  
  453.  
  454.                                  CED 1.0 User's Guide - 6
  455.  
  456.  
  457.  
  458.  
  459.  
  460.             When you recall an old command and re-enter it without editing,
  461.             the re-entered command is not added to the stack, and the pointer
  462.             will drop one level.  Suppose, for example, that you press <Up>
  463.             twice from the position above (pointer below C): B is displayed,
  464.             and the stack looks like this:
  465.  
  466.  
  467.                                 +-------------+
  468.                                 |      A      |
  469.                                 +-------------+ <-- pointer
  470.                                 |      B      |
  471.                                 +-------------+
  472.                                 |      C      |
  473.                                 +-------------+
  474.  
  475.             If you now press <Enter> (without editing the command), command B
  476.             will be sent to DOS, and the pointer will drop to point between B
  477.             and C.  From there, <Up> will display B again, and <Down> will
  478.             display C.  Thus you can "recycle" a series of commands by
  479.             pressing <Up> until you see the first command, <Enter> to execute
  480.             it, then a series of <Down><Enter> sequences to re-execute the
  481.             commands in the original order.
  482.  
  483.             If you retrieve an old command and edit it before execution, the
  484.             newly edited command is added to the bottom of the stack, and the
  485.             pointer will point just below it.
  486.  
  487.             CED will not stack any commands of two characters or less (the
  488.             theory being that it's easier to retype than to go searching
  489.             through the stack).
  490.  
  491.             You can remove a command from the stack by displaying it and
  492.             pressing <^PgDn>, and you can clear the entire stack by pressing
  493.             <^PgUp>.
  494.  
  495.             The actual number of commands which will be held in the stack is
  496.             a function of the length of the commands and the size of the
  497.             stack (which can be increased; see below for details).
  498.  
  499.             This is one of those computer gizmos that's easier to use than it
  500.             is to explain.  Just play with <Up> and <Down>; you'll get the
  501.             idea.
  502.  
  503.  
  504.             Saving and loading the stack
  505.             ----------------------------
  506.  
  507.             You can save the contents of the command stack to a disk file by
  508.             typing:
  509.  
  510.                  CED SAVESTK filename
  511.  
  512.             For example:
  513.  
  514.  
  515.  
  516.                                  CED 1.0 User's Guide - 7
  517.  
  518.  
  519.  
  520.  
  521.  
  522.                  CED SAVESTK current.stk
  523.  
  524.             This command will save the current contents of the command stack
  525.             in a file named CURRENT.STK.  This is a standard ASCII text file
  526.             that you can display (using TYPE or a file viewer) and edit
  527.             (using your text editor, EDLIN/EDIT, or a word processor in non-
  528.             document mode).  Because the file contains DOS commands, you can
  529.             also give it a .BAT extension and use it as a batch file (but be
  530.             sure to remove the SAVESTK command and any other CED commands
  531.             before doing so.)
  532.  
  533.             You can also load the contents of a disk file into the command
  534.             stack by typing:
  535.  
  536.                  CED LOADSTK filename
  537.  
  538.             For example:
  539.  
  540.                  CED LOADSTK current.stk
  541.  
  542.             This command would add the contents of CURRENT.STK to CED's
  543.             command stack.  Be sure that the file contains only executable
  544.             commands and is in ASCII format!  CED does not check the
  545.             "reasonableness" of the file.
  546.  
  547.  
  548.             Application program command stack
  549.             ---------------------------------
  550.  
  551.             CED actually keeps two complete command stacks: one is for DOS
  552.             commands, the other for commands entered into compatible appli-
  553.             cation programs (DEBUG, et al).  Thus, DOS commands will not
  554.             appear in the command stack while in DEBUG, and vice versa.
  555.  
  556.             The SAVESTK and LOADSTK functions do not use or affect this "user
  557.             program" command stack
  558.  
  559.  
  560.             PCALL function
  561.             --------------
  562.  
  563.             "PCALL" stands for parameter recall; this is a second way to
  564.             quickly retrieve old commands.  PCALL simply remembers old
  565.             parameters to specific commands.  For example, suppose you have
  566.             an editor called "edit", and the last time you executed it, you
  567.             used "edit c:\util\foo.doc".  If you now enter "edit" without any
  568.             parameters, CED will assume that you want to edit the same file
  569.             and will supply the "c:\util\foo.doc" for you.
  570.  
  571.             You could, of course, scroll back through the command buffer to
  572.             find the old command, but it might take a while to find it (and
  573.             the command might be missing if it was too long ago).
  574.  
  575.  
  576.  
  577.  
  578.                                  CED 1.0 User's Guide - 8
  579.  
  580.  
  581.  
  582.  
  583.  
  584.             Because many commands are best used WITHOUT parameter recall
  585.             (FORMAT and ERASE are good examples), CED will only use PCALL on
  586.             commands that you specify.   To make a command "PCALLable", type
  587.  
  588.                  CED PCALL <command>
  589.  
  590.             at the DOS prompt.  For example, if you want to make "edit" a
  591.             PCALL command, type
  592.  
  593.                  CED PCALL edit
  594.  
  595.             (Remember that the CED diskette need not be available).
  596.  
  597.             If you wish to issue a command for which PCALL is enabled, but
  598.             you do not want it to have parameters, add a space after the
  599.             command.  For example, suppose you have issued a "CED PCALL dir"
  600.             command and your last dir was a "dir *.exe". If you now type
  601.             "dir", CED will add the "*.exe" automatically.  However, if you
  602.             type "dir " (note the space), CED will not add the "*.exe", and
  603.             you'll get a full directory.
  604.  
  605.             You may also bypass PCALL processing through the use of the
  606.             ignore character; see below, under "Ignoring Individual
  607.             Commands".
  608.  
  609.  
  610.             Synonyms
  611.             --------
  612.  
  613.             The synonym function allows you to define brief "synonyms" for
  614.             frequently used commands.  For example, suppose you invoke your
  615.             communications package by typing "talk rbbs /c63".  CED allows
  616.             you to abbreviate this to a shorter command, say, "bb", by typing
  617.             at the DOS prompt:
  618.  
  619.                  CED SYN bb talk rbbs /c63
  620.  
  621.             The exact syntax is:
  622.  
  623.                  CED SYN <synonym> <command>
  624.  
  625.             The <synonym> is the command abbreviation (which you will type at
  626.             the DOS prompt), and <command> is the word or phrase that CED
  627.             will substitute when it sees <synonym>.  The synonym is always
  628.             the first word after the keyword "syn", and <command> is always
  629.             all of the remaining words.
  630.  
  631.             For example, "CED syn d dir" allows you to type "d" instead of
  632.             "dir".  You may add parameters: "d *.exe" becomes equivalent to
  633.             "dir *.exe".
  634.  
  635.             Many people define very short synonyms for frequently used
  636.             commands:
  637.  
  638.  
  639.  
  640.                                  CED 1.0 User's Guide - 9
  641.  
  642.  
  643.  
  644.  
  645.  
  646.                  CED SYN d dir
  647.                  CED SYN e edit
  648.                  CED SYN g debug
  649.                  CED SYN l link
  650.                  CED SYN rbbs talk rbbs /c63
  651.                  CED SYN cc1 cc1 -bpe
  652.  
  653.             Note in the last example that you can use a synonym that is
  654.             identical to its associated phrase and simply use it to automat-
  655.             ically add parameters.
  656.  
  657.             Also note that synonym processing takes place AFTER PCALL
  658.             processing; thus if you use a command synonym and wish the
  659.             command to be "PCALLable", use the synonym in the PCALL command.
  660.             For example:
  661.  
  662.                  CED SYN e edit
  663.                  CED PCALL e    (not PCALL edit)
  664.  
  665.  
  666.             User program synonyms
  667.             ---------------------
  668.  
  669.             Because CED "knows" whether it is being used from the DOS prompt
  670.             or from an application program such as DEBUG, it is possible to
  671.             define separate sets of synonyms for DOS commands and for user
  672.             programs.  The syntax for a "user synonym" is
  673.  
  674.                  CED USERSYN <synonym> <command>
  675.  
  676.             This is identical to the SYN command except for the new keyword
  677.             USERSYN.  For example, if you need to frequently type the DEBUG
  678.             command "d ds:1010 1200", you might use
  679.  
  680.                  CED USERSYN d1 d es:1010 1200
  681.  
  682.             (Remember that DEBUG is a CED-compatible program; thus you can
  683.             type CED commands at the DEBUG prompt.)  Then you could simply
  684.             type "d1" to dump memory from the specified address.  Note that
  685.             a "d1" USERSYN is separate from a "d1" SYN; at the DOS prompt
  686.             you'd get the SYN, in DEBUG or EDLIN you'd get the USERSYN.
  687.  
  688.  
  689.             Compound synonyms
  690.             -----------------
  691.  
  692.             Just as there are simple and compound sentences, there are simple
  693.             a compound synonyms.  A compound synonym is simply a synonym that
  694.             issues more than one command; these commands are issued
  695.             sequentially at succeeding DOS prompts, much like a batch file.
  696.             This is called "chaining" because commands are "chained"
  697.             together, one after the other.
  698.  
  699.  
  700.  
  701.  
  702.                                 CED 1.0 User's Guide - 10
  703.  
  704.  
  705.  
  706.  
  707.  
  708.             Suppose, for example, that in order to run your communications
  709.             package, you always type:
  710.  
  711.                  cd \talk
  712.                  talk cis /c63
  713.                  cd \
  714.  
  715.             You could put this sequence into one synonym by typing
  716.  
  717.                  CED SYN cis cd \talk^talk cis /c63^cd \
  718.  
  719.             The ^ character serves as a command separator.  When you type CIS
  720.             at the prompt, CED will output everything up to the ^ (in this
  721.             case, "cd \talk") and then simulate an <Enter>.  The next time
  722.             DOS requests input, it will get "talk cis /c63<Enter>", and so
  723.             on.
  724.  
  725.             Note that CED will not pass DOS commands to user programs; thus,
  726.             in
  727.  
  728.                  CED SYN bug cd \util^debug^cd \
  729.  
  730.             DEBUG would not see the trailing "cd \", which would still be
  731.             held up until you return to the DOS prompt.
  732.  
  733.             The first of the chained commands (e.g., the first 'cd \' above)
  734.             cannot itself be a synonym, but the remaining commands can.  That
  735.             is, if 'f' and 'g' are synonyms, the command
  736.  
  737.                  CED SYN h dir^f^g
  738.  
  739.             will work as you expect.  Be careful, though.  A command like
  740.  
  741.                  CED SYN f dir^f
  742.  
  743.             will put the computer into a loop from which there is no retreat.
  744.  
  745.             It may be useful in some circumstances, however, to fool CED into
  746.             allowing the first command to be a synonym by simply inserting a
  747.             ^ as the first character of the chain:
  748.  
  749.                  CED SYN d dir
  750.                  CED SYN f ^d^cd \
  751.  
  752.             When "f" is keyed, CED will first pass a null string to DOS, then
  753.             "dir" and "cd \".  This trick will work OK at the DOS prompt, but
  754.             it may cause problems in some user programs (it would insert a
  755.             blank line, for example, if you were in EDLIN line-insert mode).
  756.  
  757.             Compound synonyms can be "nested", i.e., one synonym can call
  758.             another.  Consider the following pair of definitions:
  759.  
  760.                  CED SYN 1 a^b^c
  761.                  CED SYN 2 x^1^z
  762.  
  763.  
  764.                                 CED 1.0 User's Guide - 11
  765.  
  766.  
  767.  
  768.  
  769.  
  770.             By executing "2", the commands issued will be x, a, b, c,and z.
  771.             The only limitation is that the stored commands ready for
  772.             chaining must not exceed 512 characters total.  In the above
  773.             example, after you have keyed "2" and the "x" is passed to the
  774.             operating system, the stored commands will be:
  775.  
  776.                  1^z
  777.  
  778.             which requires 4 characters of storage (3 for the stored
  779.             commands, plus one for a terminating carriage return).  The next
  780.             time CED is called, it will note that "1" is a synonym; the first
  781.             "1" command ("a") is passed to the operating system, and the new
  782.             stored commands will be:
  783.  
  784.                  b^c^z
  785.  
  786.             which requires 6 bytes of storage.  At no time can this list of
  787.             stored commands exceed 512 bytes; characters pushed beyond the
  788.             end of this storage will be lost.
  789.  
  790.             For whatever it's worth, you can use chaining directly at the dos
  791.             prompt:
  792.  
  793.                  C> dir^cd \
  794.  
  795.             will work as you'd expect.  There is one restriction: the first
  796.             command (before the ^) cannot be a CED synonym.  You can overcome
  797.             this by simply adding an initial ^ character:
  798.  
  799.                  C> ^syn1^syn2
  800.  
  801.             You may alter the chain character (command separator) via the CED
  802.             command
  803.  
  804.                  CED CHAINCH <char>
  805.  
  806.             So, for example, "CED CHAINCH &" would replace ^ with & as the
  807.             command separator.  The chain character can, but probably should
  808.             not, be a control character.  If you are typing the command
  809.             directly into CED, you can just type the control character:
  810.  
  811.                  CED CHAINCH <Ctrl-A>
  812.  
  813.             However, if you are setting the chain character via configuration
  814.             files (below), it may not be possible to type in the control
  815.             character directly.  For this reason, you can also specify a
  816.             control character by typing the caret (^) and a letter key.
  817.             Thus, if you wanted to use ^Y as the chain character, you would
  818.             use '^' and 'Y':
  819.  
  820.                  CED CHAINCH ^Y
  821.  
  822.             Certain control characters should not be used as for this
  823.             purpose, because they are used for other functions by DOS; among
  824.  
  825.  
  826.                                 CED 1.0 User's Guide - 12
  827.  
  828.  
  829.  
  830.  
  831.  
  832.             these are ^C (cancel), ^G (bell), ^H (backspace), ^I (tab), ^J
  833.             (linefeed), ^M (carriage return), ^P (printer on), and ^S (stop).
  834.  
  835.             The use of control characters as described has more meaningful
  836.             use in setting the "ignore" and "status request" characters
  837.             (below).
  838.  
  839.  
  840.             Command parameters
  841.             ------------------
  842.  
  843.             This section describes how synonyms and command chaining interact
  844.             with command line parameters.
  845.  
  846.             The simplest case is a single word synonym like
  847.  
  848.                  CED SYN d dir
  849.  
  850.             which specifies no special parameter handling.  In this case, any
  851.             command line parameters are simply tacked on after the synonym
  852.             substitution: "d *.exe /w" becomes "dir *.exe /w".
  853.  
  854.             If the synonym itself contains parameters:
  855.  
  856.                  CED SYN dw dir /w
  857.  
  858.             a similar situation holds.  For example, "dw *.asm" becomes "dir
  859.             /w *.asm".  You might think of these simple synonyms as just
  860.             substitutions: when CED sees the synonym, it will simply
  861.             substitute the replacement text, leaving the rest of the command
  862.             line alone.
  863.  
  864.             This simple substitution, however, means that your command line
  865.             parameters must always be the last text of the synonym.  There
  866.             would be no way, for example, to define a synonym that would
  867.             obtain a directory of <name>.exe, where <name> is some filename
  868.             entered on the command line and ".exe" is part of the synonym.
  869.             That is, it would not be possible to define a synonym "d" such
  870.             that the command
  871.  
  872.                  d foo
  873.  
  874.             would result in a "dir foo.exe" command.
  875.  
  876.             CED does provide a way to substitute parameters into the
  877.             middle of a synonym.  CED recognizes the "%n" dummy parameter
  878.             format used by DOS batch files.  %1 represents the first command
  879.             line parameter, %2 is the second, and so on, up to %9.  Refer to
  880.             your DOS documentation (batch file section) if this is unclear.
  881.  
  882.             Thus, a synonym which would provide the example function is:
  883.  
  884.                  CED SYN d dir %1.exe
  885.  
  886.  
  887.  
  888.                                 CED 1.0 User's Guide - 13
  889.  
  890.  
  891.  
  892.  
  893.  
  894.             When "d foo" is executed, "foo" (the first command line
  895.             parameter) is substituted for the %1, resulting in the desired
  896.             command "dir foo.exe".
  897.  
  898.             When a synonym contains chained commands, all parameter
  899.             substitution is performed at one time, before the chain is
  900.             started.  Thus,
  901.  
  902.                  CED SYN f a %1^b %2^c %3
  903.  
  904.             when executed "f one two three" will result in three commands:
  905.  
  906.                  a one
  907.                  b two
  908.                  c three
  909.  
  910.             If a chain-command synonym contains no dummy parameters (no %'s)
  911.             the command line parameters will be appended to the end of the
  912.             chain, i.e., as parameters to the last command.  So,
  913.  
  914.                  CED SYN f a^b^c
  915.  
  916.             when executed "f foo" will result in the three commands:
  917.  
  918.                  a
  919.                  b
  920.                  c foo
  921.  
  922.             You can change the dummy parameter character from '%' to another
  923.             character using the
  924.  
  925.                  CED PARAMCH <char>
  926.  
  927.             command.  The rules described for CHAINCH apply here.
  928.  
  929.  
  930.             Ignoring commands
  931.             -----------------
  932.  
  933.             There may be certain commands that you do not want CED to
  934.             process; for example, you might not want the ERASE command
  935.             stacked.  To instruct CED to ignore a command, use the CED
  936.             command
  937.  
  938.                  CED IGNORE <command>
  939.  
  940.             For example:
  941.  
  942.                  CED IGNORE erase
  943.  
  944.             When a command is set to IGNORE, CED will not place it in the
  945.             command stack, check for synonyms, or perform any PCALL pro-
  946.             cessing (even if you have set PCALL for that command).
  947.  
  948.  
  949.  
  950.                                 CED 1.0 User's Guide - 14
  951.  
  952.  
  953.  
  954.  
  955.  
  956.             Remember, though, that it is CED that "ignores" a command, not
  957.             DOS.  The command CED IGNORE FORMAT does NOT prevent the user
  958.             from executing a FORMAT command; it simply stops CED from placing
  959.             the command into the stack, looking for a synonym named FORMAT,
  960.             etc.
  961.  
  962.  
  963.             Ignoring individual commands
  964.             ----------------------------
  965.  
  966.             You may sometimes want CED to ignore processing of a specific
  967.             command.  For example, you may have "dir" defined as a synonym
  968.             for an external program that will display a sorted directory, but
  969.             on occasion want to display a standard DOS directory.  To force
  970.             CED to suspend all processing of a command, precede it with ^N
  971.             (Ctrl-N).  If the first character of input is ^N, CED will not
  972.             stack the command, check for synonyms, or perform any PCALL
  973.             processing (just as if it were IGNOREd).  The Ctrl-N, of course,
  974.             is not passed to DOS or to the application program.  For example:
  975.  
  976.                  ^Ndir
  977.  
  978.             If you find ^N inconvenient, you can change the ignore character
  979.             to a different character by using the IGNORECH command:
  980.  
  981.                  CED IGNORECH ^T
  982.                  CED IGNORECH !
  983.  
  984.             See the section on compound synonyms (above) for more information
  985.             on how to enter control characters in this command.
  986.  
  987.  
  988.             Clearing CED objects
  989.             --------------------
  990.  
  991.             From time to time it may be useful to clear a CED "object": a
  992.             PCALL command, a synonym, or an ignore command.  The CLEAR
  993.             command allows you to do this.  The formal syntax is:
  994.  
  995.                  CED CLEAR <function> [[FROM] <name>]
  996.  
  997.             This looks more complex than it is.  The <function> is one of
  998.             SYN, USERSYN, PCALL, and IGNORE.  Since the [[FROM] <name>] is
  999.             optional, the simplest form of the clear command is exemplified
  1000.             by:
  1001.  
  1002.                  CED CLEAR SYN
  1003.  
  1004.             which will clear all synonyms.  Similarly,
  1005.  
  1006.                  CED CLEAR PCALL
  1007.  
  1008.             clears all PCALL commands.
  1009.  
  1010.  
  1011.  
  1012.                                 CED 1.0 User's Guide - 15
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.             You may clear an individual item by including its name.  For
  1019.             example:
  1020.  
  1021.                  CED CLEAR USERSYN foo
  1022.  
  1023.             clears the user synonym "foo", leaving all others synonyms
  1024.             undisturbed.
  1025.  
  1026.             Finally, you can clear all items FROM a specified item through
  1027.             the end of the list with the FROM option.  For example:
  1028.  
  1029.                  CED CLEAR USERSYN FROM foo
  1030.  
  1031.             would clear the user synonym "foo" and all synonyms listed after
  1032.             "foo".  This command is particularly useful if you have loaded a
  1033.             temporary set of synonyms for some special purpose.  Suppose, for
  1034.             example, that you have a set of synonyms already in memory, then
  1035.             you load an additional set to be used temporarily.  When you are
  1036.             done, the command
  1037.  
  1038.                  CED CLEAR SYN FROM foo
  1039.  
  1040.             would delete all of the "temporary" synonyms, assuming that the
  1041.             first of these was "foo".
  1042.  
  1043.             Note that SYN and USERSYN objects share storage.  Thus, a CLEAR
  1044.             SYN FROM <item> or CLEAR USERSYN FROM <item> will clear all
  1045.             synonyms (of either type) FROM the named item.  Similarly, CLEAR
  1046.             SYN and CLEAR USERSYN are functionally identical: all synonyms of
  1047.             either type will be cleared.
  1048.  
  1049.  
  1050.             Configuration files
  1051.             -------------------
  1052.  
  1053.             Obviously it would be inconvenient to have to type in all of
  1054.             these commands every time you use your computer.  However, you
  1055.             may put any CED command into a special CED configuration file,
  1056.             and have them loaded all at once.
  1057.  
  1058.             The configuration file is simply an ASCII text file (created by
  1059.             your text editor, EDLIN, or word processor in nondocument mode)
  1060.             that contains a series of CED commands.  Just leave out the
  1061.             keyword "CED", but include the rest of the command:
  1062.  
  1063.                  Rem       Remarks are OK if preceded by "REM"
  1064.                  Rem
  1065.                  Rem       Set chain char to '&'
  1066.                  Chainch &
  1067.                  Rem       Set ignore char to '!'
  1068.                  Ignorech !
  1069.                  Rem       Set a few synonyms
  1070.                  Syn d dir
  1071.                  Syn e edit
  1072.  
  1073.  
  1074.                                 CED 1.0 User's Guide - 16
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.                  Syn cis cd \talk & talk cis & cd \
  1081.                  Usersyn dd d ds:1017 L40
  1082.                  Rem       And a few PCALL commands
  1083.                  PCALL e
  1084.                  PCALL debug
  1085.                  Rem       Ignore all DEL, ERASE, and FORMAT commands
  1086.                  Ignore erase
  1087.                  Ignore format
  1088.                  Ignore del
  1089.  
  1090.             To read in your file, use the CED -F command line option:
  1091.  
  1092.                  CED -F<filename>
  1093.  
  1094.             For example, if your configuration file is call CED.CFG, you'd
  1095.             use
  1096.  
  1097.                  CED -Fc:\boot\ced.cfg
  1098.  
  1099.             If you load new configuration files during one computer session,
  1100.             the PCALL, SYN, USERSYN, and IGNORE commands are added to those
  1101.             already stored, without regard to duplication (see "Multiple
  1102.             definitions" below).
  1103.  
  1104.             Note that if you have several commands that you want to enter
  1105.             into CED (but don't have them in a file), you can use
  1106.  
  1107.                  CED -Fcon
  1108.  
  1109.             (which specifies CON: as the configuration file name) and then
  1110.             type a series of CED commands from the keyboard.  Type ^Z when
  1111.             you are done.
  1112.  
  1113.  
  1114.             Changing default buffer sizes
  1115.             -----------------------------
  1116.  
  1117.             CED maintains six separate internal buffers (regions of memory
  1118.             where data is stored).  Each buffer is initially set to a default
  1119.             size.  The buffers and their default sizes are:
  1120.  
  1121.                  1. DOS command stack (2048 bytes)
  1122.                  2. Application program command stack (1024)
  1123.                  3. Synonym list (2048)
  1124.                  4. PCALL list (1024)
  1125.                  5. Ignore command list (1024)
  1126.                  6. User command list (described below) (1024)
  1127.  
  1128.             You may make these buffers larger or smaller by including a list
  1129.             of buffer sizes the FIRST time you load CED during a session
  1130.             (i.e., when you turn on the computer, or after a Ctrl-Alt-Del
  1131.             reboot).  Use a -B switch as the FIRST CED command:
  1132.  
  1133.                  CED -Bn1,n2,n3,n4,n5,n6
  1134.  
  1135.  
  1136.                                 CED 1.0 User's Guide - 17
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.             where n1 is the desired size for buffer 1 (DOS command stack), n2
  1143.             is the size for buffer 2 (App program command stack), etc.  You
  1144.             need not specify all sizes, but if you skip one or more sizes
  1145.             (telling CED to use the default) you must include the separating
  1146.             commas.  Examples:
  1147.  
  1148.                  CED -B1000,2000,3000,4000,5000,6000  (Set all sizes)
  1149.                  CED -B1000,,3000  (Set sizes 1 and 3)
  1150.                  CED -B,,,,,6000 (Set size 6 only)
  1151.  
  1152.             You cannot set any individual size less than 64 bytes, and the
  1153.             total of all sizes must be not exceed 52K (53248) bytes.
  1154.  
  1155.             Remember that the -B command must be the FIRST command used the
  1156.             FIRST time you run CED during each session.  It is not valid any
  1157.             other time.  If you wish to set sizes and read a configuration
  1158.             file during autoexec, the syntax would be:
  1159.  
  1160.                  CED -Bn1,n2,n3,n4,n5,n6 -F<filename>
  1161.  
  1162.             For your general information, here is what is stored in each of
  1163.             the buffers, and what happens when they fill:
  1164.  
  1165.             1. DOS Command stack: all non-ignored commands of 3 or more
  1166.             characters entered at the DOS prompt.  The command is stored
  1167.             before synonym and PCALL processing.  Each stored command
  1168.             requires one byte more than the length of the command. When the
  1169.             buffer fills, the oldest command is deleted.
  1170.  
  1171.             2. Application program command stack: same as above, except
  1172.             commands entered at participating program prompts are stored
  1173.             here.
  1174.  
  1175.             3. Synonym list: the full list of synonyms (both DOS and user
  1176.             synonyms) plus their meanings.  Each entry requires the combined
  1177.             length of the synonym and its associated command plus three
  1178.             bytes.  When the synonym list fills, no new synonyms will be
  1179.             accepted unless a CLEAR is performed first.
  1180.  
  1181.             4. PCALL command list: the list of all PCALL commands plus the
  1182.             most recent parameter list for each.  Each entry requires the
  1183.             combined length of the command and its current parameters
  1184.             (including leading separators) plus two bytes.  If the buffer is
  1185.             full when a "CED PCALL" command is entered, the new PCALL command
  1186.             will not be accepted.  If the buffer is full when a PCALLable
  1187.             command is entered, its parameters will not be remembered.
  1188.  
  1189.             5. Ignore command list: the list of all IGNORE commands.  Each
  1190.             entry requires the command length plus one byte.  If the buffer
  1191.             is full when a new "CED IGNORE" command is entered, the new
  1192.             command will be rejected.
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.                                 CED 1.0 User's Guide - 18
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.             6. User-installed command list: the list of all user-installed
  1205.             commands.  Requires the command length plus six bytes of storage
  1206.             for each.  New commands will be rejected if the buffer is full.
  1207.  
  1208.  
  1209.             Status display
  1210.             --------------
  1211.  
  1212.             You can obtain a partial display of CED status any time CED is
  1213.             active (i.e., at the DOS prompt or in a compatible program
  1214.             awaiting input).  Do this by hitting ^T (Ctrl-T).  CED will first
  1215.             display all SYNonyms and  USERSYNonyms, then a list of all buffer
  1216.             sizes.  For each buffer CED will show the total bytes allocated
  1217.             and the number of bytes free.
  1218.  
  1219.             When the display is complete, CED will redisplay any partial
  1220.             input that you typed before ^T, and you may continue data entry.
  1221.  
  1222.             If ^T is not convenient, you can change the status request
  1223.             character by using the CED command
  1224.  
  1225.                  CED STATCH <character>
  1226.  
  1227.             as in "CED STATCH ^A" or "CED STATCH %".  See the section on
  1228.             command chaining for more information on using control characters
  1229.             in this command.
  1230.  
  1231.  
  1232.             Multiple definitions
  1233.             --------------------
  1234.  
  1235.             It is possible to duplicate a definition within one of the CED
  1236.             lists (SYN, USERSYN, PCALL, IGNORE).  For example, you may create
  1237.             more than one synonym for "d".  In the event of multiple
  1238.             definitions, CED will always use the newest.
  1239.  
  1240.             Suppose, for example, that you have "d" defined as a SYN for
  1241.             "dir".  If you subsequently issue the command "CED SYN d debug",
  1242.             you will have two synonyms for "d".  When you enter "d", CED will
  1243.             use the latest definition: "debug".  If you then issue a "CLEAR
  1244.             SYN d", CED will again use the latest definition and clear the
  1245.             "debug" synonym, at which point the "dir" definition again
  1246.             becomes effective.
  1247.  
  1248.             Multiple definitions have no real meaning for PCALL and IGNORE,
  1249.             but they are supported nonetheless.
  1250.  
  1251.  
  1252.             Problem determination
  1253.             ---------------------
  1254.  
  1255.             If you find any problems with CED, please report them to me,
  1256.             preferably at CompuServe ID 76703,2002.  Before reporting
  1257.             problems, however, PLEASE take the following steps:
  1258.  
  1259.  
  1260.                                 CED 1.0 User's Guide - 19
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.                  1. REREAD THE DOCUMENTATION!  The majority of "problems"
  1267.                  that have been reported to date could have been solved by a
  1268.                  careful review of this Guide.
  1269.  
  1270.                  2. Install CED in a "clean" environment, i.e., without any
  1271.                  other resident utilities.  Temporarily rename your
  1272.                  AUTOEXEC.BAT and CONFIG.SYS files to other names; reboot,
  1273.                  reinstall CED, and test.  If it works correctly, there is a
  1274.                  conflict with some other program.  Try to isolate the
  1275.                  conflict by reinstalling your other programs one by one. You
  1276.                  may even be able to resolve the conflict by varying the load
  1277.                  order.  If you locate the conflict, let me know about it.  I
  1278.                  cannot guarantee that it will be resolved, but I will make
  1279.                  an attempt when time permits.
  1280.  
  1281.                  It will not be necessary to rename CONFIG.SYS if it only
  1282.                  contains FILES, BUFFERS, COUNTRY, FCBS, and ANSI.SYS
  1283.                  statements.
  1284.  
  1285.             If the problem persists, please report the problem as accurately
  1286.             and completely as possible.  Include the CED version number
  1287.             (obtained by the command CED VER), and a listing of your
  1288.             CONFIG.SYS and AUTOEXEC.BAT files if you think that might have
  1289.             some bearing (they usually do).
  1290.  
  1291.             These are by far the three most common problems we've encountered
  1292.             over the years:
  1293.  
  1294.                  PROBLEM: the command editor works, but synonyms don't.  If
  1295.                  you have a synonym named "D" and you type "D" at the DOS
  1296.                  prompt, DOS says "Bad command or filename".
  1297.  
  1298.                  CAUSE: PCED probably thinks that it's at a user program
  1299.                  prompt rather than at the DOS prompt, i.e., it thinks it's
  1300.                  in DEBUG or some such rather than at the command prompt.
  1301.                  You can confirm this by typing two commands at the DOS
  1302.                  prompt:
  1303.  
  1304.                       CED USYN d dir
  1305.                       d
  1306.  
  1307.                  If you see a directory, this is definitely the cause.
  1308.  
  1309.                  SOLUTION: the DOS prompt must be the FIRST request for
  1310.                  keyboard input after CED is loaded.  If you have anything in
  1311.                  your AUTOEXEC.BAT after CED that needs keyboard input, move
  1312.                  it to a position before CED.  In 95% of the cases reported
  1313.                  to us, this problem has been caused by the presence of a
  1314.                  DATE and/or TIME command in AUTOEXEC after CED has already
  1315.                  been loaded.  Just move DATE/TIME to a position "earlier" in
  1316.                  the batch file so that they run before CED.  By the way,
  1317.                  PCED (the commercial version of CED), is smarter about DOS
  1318.                  prompt recognition and never suffers from this problem.
  1319.  
  1320.  
  1321.  
  1322.                                 CED 1.0 User's Guide - 20
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.                                         ----------
  1329.  
  1330.                  PROBLEM: When you execute a synonym that contains multiple
  1331.                  commands, you find that you have to press <Enter> or another
  1332.                  key after the first command in order to execute the rest of
  1333.                  the commands.
  1334.  
  1335.                  CAUSE: You are using a resident program that uses some
  1336.                  rather old technology.
  1337.  
  1338.                  SOLUTION: identify the perpetrator.  Suspects are any
  1339.                  resident programs loaded after CED.  Remove suspects from
  1340.                  your AUTOEXEC.BAT one by one until the problem goes away;
  1341.                  the last one removed was the culprit.  Then, try reversing
  1342.                  the load order so that the offending program loads before
  1343.                  CED; sometimes this will fix the problem.  If not, discard
  1344.                  the offender or upgrade to a newer version (most resident
  1345.                  programs don't do this any more--it was a much more common
  1346.                  problem in the mid-80's than it is in the 90's).
  1347.  
  1348.                                         ----------
  1349.  
  1350.                  PROBLEM: You are surprised to find that you can't enter data
  1351.                  beginning with the word "CED" into a program (EDLIN or LIST,
  1352.                  for example).
  1353.  
  1354.                  CAUSE: CED is "active", as defined above.  Thus, as
  1355.                  documented, CED is watching for commands--which begin with
  1356.                  the keyword CED.  Your input is being interpreted as a CED
  1357.                  command, not as data to your program.
  1358.  
  1359.                  SOLUTION: precede the data you are entering by the ignore
  1360.                  character (^N).
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                                 CED 1.0 User's Guide - 21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.                                Appendix A: Command summary
  1391.                                ---------------------------
  1392.  
  1393.             The following is a complete summary of all CED commands.  These
  1394.             commands may be included in a CED configuration file (with the
  1395.             exception of -F and -B), or they may be typed in directly by
  1396.             prefixing them with "CED ".
  1397.  
  1398.             -Bn1,n2,n3,n4,n5,n6      Sets the sizes of the six internal
  1399.                                      buffers.  Valid ONLY as FIRST command
  1400.                                      when installing CED after boot or
  1401.                                      reboot.
  1402.  
  1403.             -F<Filename>             Loads a CED configuration file.  Not a
  1404.                                      valid command within a config file.
  1405.  
  1406.             SYN <synonym> <command>  Defines a synonym.  The first word is
  1407.                                      the synonym, all remaining words are
  1408.                                      substituted for the synonym.
  1409.  
  1410.             USERSYN <synonym> <command>  Defines a user synonym.  Identical
  1411.                                      to SYN, except that the synonym is
  1412.                                      available within user programs rather
  1413.                                      than at the DOS prompt.
  1414.  
  1415.             PCALL <command>          Defines a command subject to PCALL
  1416.                                      processing.
  1417.  
  1418.             IGNORE <command>         Defines a command to be ignored--CED
  1419.                                      will not perform any processing on this
  1420.                                      command at all.
  1421.  
  1422.             CHAINCH <char>           Defines the command chaining character,
  1423.                                      which is the character used to separate
  1424.                                      commands in a multi-command synonym.
  1425.                                      Normally '^'.
  1426.  
  1427.             IGNORECH <char>          Defines the keyboard-ignore character;
  1428.                                      when this character is typed as the
  1429.                                      first character of keyboard input, CED
  1430.                                      will perform no further processing on
  1431.                                      it.  Normally ^N.
  1432.  
  1433.             STATCH <char>            Defines the status request character.
  1434.                                      When you type this character while CED
  1435.                                      is active, CED will display its status.
  1436.                                      Normally ^T.
  1437.  
  1438.             PARAMCH <char>           Defines the dummy parameter character.
  1439.                                      Normally '%'.
  1440.  
  1441.             CLEAR <function> [[FROM] <name>]   Clears all or part of a
  1442.                                      list of CED objects.  <function> is one
  1443.                                      of SYN, USERSYN, PCALL, or IGNORE.
  1444.  
  1445.  
  1446.                                 CED 1.0 User's Guide - 22
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.                                      Without arguments, clears all of the
  1453.                                      specified list.  With a <name>, clears
  1454.                                      that item only.  With a FROM <name>,
  1455.                                      clears that item and all subsequent
  1456.                                      items.
  1457.  
  1458.             VER                      Display CED version number and copyright
  1459.                                      notice.
  1460.  
  1461.  
  1462.             Commands may be abbreviated as follows:
  1463.  
  1464.                  USERSYN        USYN
  1465.                  PCALL          PC
  1466.                  IGNORE         IG
  1467.                  CHAINCH        CC
  1468.                  IGNORECH       IC
  1469.                  STATCH         SC
  1470.                  PARAMCH        PM   (NOT PC!)
  1471.                  CLEAR          CL
  1472.  
  1473.             Note, however, that the arguments to CLEAR may NOT be
  1474.             abbreviated; CLEAR USYN or CLEAR IG are not valid.
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.                                 CED 1.0 User's Guide - 23
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.                              Appendix B: Order of Processing
  1515.                              -------------------------------
  1516.  
  1517.             CED performs its basic processing in the following order:
  1518.  
  1519.             1. Obtain input.  If there is a chained command pending, obtain
  1520.             input from the chain; otherwise from keyboard.
  1521.  
  1522.             2. Check for "ignore".  If command is an "ignore" command or if
  1523.             the first character of input is the ignore character, skip all
  1524.             further processing.
  1525.  
  1526.             3. Stack the command (if longer than two characters) in the
  1527.             appropriate command stack.
  1528.  
  1529.             4. Perform PCALL (parameter recall) processing and store the
  1530.             result for PCALL processing next time the same command is
  1531.             entered.
  1532.  
  1533.             5. Perform synonym processing and parameter substitution.
  1534.  
  1535.             6. Check for CED command.  If input is a CED command, process and
  1536.             clear the input (returning null string to caller).  Skip rest.
  1537.  
  1538.             7. Check for command chaining.  If the chain character appears in
  1539.             the input, store all commands after the first chain character for
  1540.             later processing, and pass back the first command only.
  1541.  
  1542.             8. Examine the resulting command and see if it's a user-installed
  1543.             command.  If so, call user command processor.
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.                                 CED 1.0 User's Guide - 24
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.                                  Appendix C: Limitations
  1577.                                  -----------------------
  1578.  
  1579.             There is a limit of 255 characters on any input line from a CED
  1580.             configuration file.  DOS will limit you to 127 characters at the
  1581.             DOS prompt.
  1582.  
  1583.             For PCALL, SYN, USERSYN, and IGNORE to be effective, their
  1584.             commands must begin in the first column of input and must be
  1585.             separated from any parameters by one of the following characters:
  1586.  
  1587.                  ; , < > | = + [ ] / <Tab> <Space>
  1588.  
  1589.             Thus, if you have "cd" defined for PCALL processing, "cd\" will
  1590.             not work correctly.  However, "cd \" will be OK.  Similarly, if
  1591.             you have a synonym "d" for "debug", the command "c:\util\d" will
  1592.             not work, nor will " d" (note leading space).
  1593.  
  1594.             Remember that CED is active only at the DOS prompt or when a user
  1595.             program requests input via DOS function 0AH.  This has several
  1596.             effects:
  1597.  
  1598.                  Programs that allow you to execute DOS commands or other
  1599.                  programs as subtasks generally do not use DOS function 0AH
  1600.                  to input the name of the subtask or command; thus, CED is
  1601.                  not active, and synonyms are usually not effective.
  1602.  
  1603.                  CED cannot operate on statements in batch files.  Thus,
  1604.                  synonyms and user-installed commands will not be recognized
  1605.                  if they are batch statements, and CED commands will cause
  1606.                  CED to be reloaded (which is probably not what you want).
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.                                 CED 1.0 User's Guide - 25
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.                                Appendix D: Version History
  1639.                                ---------------------------
  1640.  
  1641.             1.0 5/13/85
  1642.                  Original version.
  1643.  
  1644.  
  1645.             1.0A/B 6/1/85
  1646.                  PARAMCH added.  Fixed problem that caused unpredictable
  1647.                  results if DOS function 0AH called with 8088 direction flag
  1648.                  set.  Status display cleaned up.  Processing order altered
  1649.                  to allow synonyms for CED SYN to process correctly.  Early
  1650.                  ROM BIOS bug relating to cursor size trapped. Config file
  1651.                  processing speeded up. Problems parsing -B command fixed.
  1652.                  Nesting synonyms allowed, as well as direct entry of chained
  1653.                  commands at the DOS/program prompt.  Some minor
  1654.                  incompatibilities with other resident programs eliminated.
  1655.  
  1656.             1.0C 6/3/85
  1657.                  Problem with immediate parameters to SYNs (e.g., "d/w",
  1658.                  where "d" is a SYN) corrected.  Problem with PCALL list
  1659.                  overflow corrected.  Fixed error with ^Z processing during
  1660.                  configuration file read.
  1661.  
  1662.             1.0D 12/7/85
  1663.                  Added <^Home>, <^Bksp>, and <F3> (incorrectly documented as
  1664.                  being included in version 1.0C).  Corrected a few minor (and
  1665.                  unreported!) bugs.
  1666.  
  1667.             1.0E 7/24/91 (yes, we're still here)
  1668.                  Adds SAVESTK, LOADSTK, and INSMODE commands; improves word
  1669.                  parsing for editor's word left/right; detects reload from
  1670.                  disk.
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.                                 CED 1.0 User's Guide - 26
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.                         Appendix E: PCED (the commercial version)
  1701.                         -----------------------------------------
  1702.  
  1703.             In 1986, after much encouragment by users of CED, we released an
  1704.             enhanced commercial version of CED.  This was not our intent when
  1705.             the CED project was begun, but the program proved to be
  1706.             extraordinarily popular, and the amount of time spent responding
  1707.             to mail and phone calls about the program was out of all
  1708.             proportion to what we could afford.
  1709.  
  1710.             The commercial version is called PCED, for Professional CED.  PC
  1711.             Magazine has this to say about PCED:
  1712.  
  1713.                  PCED is a rare example of almost perfect program design.
  1714.  
  1715.                  PCED is crashproof, doesn't care when it's loaded, and
  1716.                  never gets in the way. Everything it does can be
  1717.                  modified, suspended, or suppressed.
  1718.  
  1719.                  If you can fit only one utility on your disk, make it
  1720.                  PCED.
  1721.  
  1722.             PCED contains these enhancements and new features, and more:
  1723.  
  1724.             COMMAND EDITOR
  1725.  
  1726.                  Function keys F1-F4 and F6 have been implemented for DOS
  1727.                  compatibility.  This is particularly useful in EDLIN.
  1728.  
  1729.                  Word delete and character transposition keys.
  1730.  
  1731.                  Filename completion: just type part of a filename (using DOS
  1732.                  wildcards if you wish) and hit the TAB key; PCED will search
  1733.                  the disk directory and "suggest" matching filenames one by
  1734.                  one.  For example, instead of typing AUTOEXEC.BAT, you might
  1735.                  type AU and hit the TAB key; PCED will quickly find
  1736.                  AUTOEXEC.BAT and fill it in for you.
  1737.  
  1738.                  You can preview the current PCALL parameters for any command
  1739.                  by simply typing the command name and then hitting <^R>.
  1740.                  The current parameter(s) are added to the command line for
  1741.                  editing.
  1742.  
  1743.             COMMAND STACKS
  1744.  
  1745.                  Stack searching: to find a particular command, just type the
  1746.                  first few characters before you hit the <Up> key.  PCED will
  1747.                  display only the commands that match what you've typed.
  1748.  
  1749.                  VSTACK provides an optional windowed, "point & shoot"
  1750.                  version of the command stack.  Your stack is displayed in a
  1751.                  scrollable pop-up window; just highlight the command you
  1752.                  want and execute it directly or bring it back to the command
  1753.                  line for editing.
  1754.  
  1755.  
  1756.                                 CED 1.0 User's Guide - 27
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.                  You can execute any command without adding it to the stack,
  1763.                  and you can add a command to the stack without executing it.
  1764.                  This is especially helpful when you've typed half of a long
  1765.                  command and can't quite remember the syntax: just put the
  1766.                  unexecuted partial command into the stack and get help; then
  1767.                  retrieve and complete the command.
  1768.  
  1769.                  You can execute and retrieve commands from the stack by
  1770.                  referring to an index number.
  1771.  
  1772.                  In addition to the text form of the stack save as
  1773.                  implemented by CED's SAVESTK, you can save the stacks in a
  1774.                  special binary format that, when reloaded, precisely
  1775.                  duplicates your current conditions: the stack pointers will
  1776.                  be where they were when the stack was saved, etc.  The form
  1777.                  of SAVESTK saves both stacks PLUS all of your PCALL
  1778.                  information.  When you boot up in the morning, PCED will be
  1779.                  in precisely the same state it was in when you shut down.
  1780.  
  1781.                  The new SHOW command displays the contents of the stack.
  1782.  
  1783.                  The new MINSTACK command allows you to set the minimum
  1784.                  length of commands that you want stacked.
  1785.  
  1786.                  The new WRAP command specifies whether you want a circular
  1787.                  or linear stack.
  1788.  
  1789.             SYNONYMS
  1790.  
  1791.                  Your synonyms can set and use environment variables.  With
  1792.                  this feature, you can, for example, create synonyms that
  1793.                  will add a directory to your PATH and delete it later;  even
  1794.                  create a generic environment-editing synonym.
  1795.  
  1796.                  Synonyms can also access and use system information such as
  1797.                  the current date, time, drive, directory, etc.  Using this
  1798.                  feature you can create a synonym that will change to a new
  1799.                  directory and automatically create a "return" synonym to
  1800.                  return to your current directory when you are done (and
  1801.                  these can be "nested"!); create filenames based on the
  1802.                  current date, time, or even day of the week.
  1803.  
  1804.                  Synonyms are fully "nestable": any command in a synonym can
  1805.                  be another synonym, including the first command (a
  1806.                  restriction in CED).
  1807.  
  1808.                  You can specify a "minimum abbrevation" of a synonym: the
  1809.                  synonym "ed*it" can be executed by any of "ed", "edi", or
  1810.                  "edit".
  1811.  
  1812.                  You can specify default parameters--command parameters that
  1813.                  will be added if the user does not specify them.  For
  1814.                  example, you can make FORMAT format drive B unless you
  1815.                  specify a different drive.
  1816.  
  1817.  
  1818.                                 CED 1.0 User's Guide - 28
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.                  You can pick apart filename parameters: your synonyms can
  1825.                  access the drive, directory, name, and extension of any
  1826.                  parameter.  You can use this to, for example, copy files
  1827.                  from drive C to drive B and change the extensions to .BAK
  1828.                  while doing so.
  1829.  
  1830.                  You can define "internal" synonyms, which amount to
  1831.                  shorthand notations for frequently typed text.  For example,
  1832.                  you might define UM as a synonym for C:\UTIL\MISC; then you
  1833.                  can type commands such as CD @UM and PCED will change it to
  1834.                  CD C:\UTIL\MISC.
  1835.  
  1836.                  You can easily delete duplicate synonyms and edit existing
  1837.                  synonyms.
  1838.  
  1839.                  Commands generated by compound synonyms do not go into the
  1840.                  command stack, and you can suppress their display, too.
  1841.  
  1842.                  PCED recognizes the existence of separate copies of the
  1843.                  command shell and does not execute pending commands (from
  1844.                  synonyms) in subsidiary copies of the shell.  You can start
  1845.                  new synonyms in the second shell, and PCED will not confuse
  1846.                  these commands with pending commands from other shells.
  1847.  
  1848.             OTHER NEW COMMANDS (PARTIAL LIST)
  1849.  
  1850.                  SAVE saves your current configuration to disk via the new
  1851.                  SAVE command.  All of your synonyms, your PCALL and IGNORE
  1852.                  lists, and many of PCED's current operating parameters are
  1853.                  placed in a configuration file which you can then edit, or
  1854.                  read into PCED via the LOAD command (which replaces CED's "-
  1855.                  F" command).
  1856.  
  1857.                  KILL removes PCED from memory, and OFF disables PCED but
  1858.                  leaves it resident.  A subsequent ON restores normal
  1859.                  operation.
  1860.  
  1861.                  LIT instructs PCED to suspend special processing of special
  1862.                  characters like ^.
  1863.  
  1864.                  HELP provides comprehensive help about any PCED command or
  1865.                  feature.  Help information is user-editable and expandable.
  1866.  
  1867.                  STATUS displays information about PCED's status; you define
  1868.                  precisely what information you want to see.
  1869.  
  1870.                  CURSOR, HEIGHT, and PROMPT provide improved screen control.
  1871.                  CURSOR defines the cursor size and shape; HEIGHT sets the
  1872.                  screen size (which can also be auto-detected); and PROMPT
  1873.                  allows you to define a special PCED prompt and, optionally,
  1874.                  a screen location.
  1875.  
  1876.                  QUEUE schedules a command for execution at the next DOS
  1877.                  prompt (perhaps, "after this batch file is finished"), and
  1878.  
  1879.  
  1880.                                 CED 1.0 User's Guide - 29
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.                  CANCEL provides a facility for rudimentary conditional
  1887.                  execution in synonyms.
  1888.  
  1889.             MISCELLANEOUS OTHER FEATURES
  1890.  
  1891.                  The keyboard is fully redefinable: you can assign any PCED
  1892.                  function to any valid keystroke.  You can also define text
  1893.                  macros; for example, you can have F10 execute a DIR A:
  1894.                  command.  Better than ANSI.SYS because these macros do not
  1895.                  affect user programs.
  1896.  
  1897.                  Single-key review of scrolled-off data.  If you want to see
  1898.                  that directory that scrolled off the screen a few minutes
  1899.                  ago, just press <PgUp>.
  1900.  
  1901.                  You can log all of your DOS commands to disk, with date and
  1902.                  time.  You can even include a four-character user ID in your
  1903.                  command log.
  1904.  
  1905.                  You can use all PCED commands in batch files; and you can
  1906.                  use most PCED synonyms in batch files via the new XCED
  1907.                  utility program (included with PCED).
  1908.  
  1909.                  Ctrl-Break handling is much improved.
  1910.  
  1911.                  Included are optional programs that: send arbitrary
  1912.                  information to any file or device (good for printer control,
  1913.                  etc.); provide repeated operations on a list of files
  1914.                  contained in a text file; display flexible sorted
  1915.                  directories in extension-based colors; improve display
  1916.                  speed.
  1917.  
  1918.                  For programmers, there's a much stronger external interface
  1919.                  that allows you to use and control many of PCED's features.
  1920.                  You can even gain access to PCED synonyms.
  1921.  
  1922.                  200+ page bound, indexed manual.  Everything you need to
  1923.                  know to use PCED as a beginner, intermediate, or advanced
  1924.                  user.  Plenty of hints, tips, and sample synonyms.
  1925.  
  1926.             Remember, this is only a partial list of new features. The PCED
  1927.             package includes all of the above plus a typeset bound and
  1928.             indexed manual.
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.                                 CED 1.0 User's Guide - 30
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.                                 Appendix F: Ordering PCED
  1949.                                 -------------------------
  1950.  
  1951.             The following information is correct as of July 1, 1991.  All
  1952.             charges are quoted in US dollars.
  1953.  
  1954.             PCED is available from:
  1955.  
  1956.                  The Cove Software Group
  1957.                  Post Office Box 1072
  1958.                  Columbia, Maryland USA 21044
  1959.                  (301) 992-9371
  1960.  
  1961.             Price per copy:
  1962.  
  1963.                  The single copy price is $50.00 plus tax where applicable
  1964.                  ($2.50 to Maryland purchasers).  Site licenses and quantity
  1965.                  discounts are available; call or write for information.
  1966.  
  1967.             Shipping & handling charges:
  1968.                                                First copy     Ea. add'l
  1969.                                                ----------     ---------
  1970.                  Continental U.S. (48 states)    $ 4.00         $1.00
  1971.                  Alaska/Hawaii                     9.00          2.00
  1972.                  Canada                            7.50          2.00
  1973.                  Other international              11.00          3.00
  1974.  
  1975.                  Orders are shipped via UPS surface to the continental U.S.
  1976.                  and UPS air to Alaska and Hawaii (international orders are
  1977.                  shipped by appropriate means).  UPS cannot deliver to Post
  1978.                  Office Boxes; please add $1.00 for First Class mail.
  1979.                  Additional charges apply for faster shipments (Second Day
  1980.                  Air, Next Day Air, etc.); please inquire for current rates.
  1981.                  Add $2.75 for C.O.D. shipments.
  1982.  
  1983.             Payment methods:
  1984.  
  1985.                  We accept Visa, MasterCard, and American Express credit
  1986.                  cards; personal and corporate checks or money orders; C.O.D.
  1987.                  (US only; $2.75 additional); purchase orders from
  1988.                  governmental units and approved corporate customers.  All
  1989.                  orders must be paid in US dollars.  Checks must be drawn on
  1990.                  a US bank or the US office of a foreign bank.
  1991.  
  1992.             System requirements:
  1993.  
  1994.                  - IBM PC, PCJr, XT, AT, PS/2, or true compatible.
  1995.                  - MS-DOS or PC-DOS 2.00 or later.
  1996.                  - With EMS memory, about 16K of DOS memory plus 16K of EMS.
  1997.                  Without EMS, about 30K of DOS memory.
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.                                 CED 1.0 User's Guide - 31
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.                            Appendix G: User-installed commands
  2011.                            -----------------------------------
  2012.  
  2013.             This appendix describes how to add new resident commands to DOS
  2014.             using CED.  It is an advanced topic, and is intended for
  2015.             programmers only; you don't need to read this section to use CED.
  2016.  
  2017.             CED provides a means to enqueue new DOS commands, that is, to add
  2018.             internal commands to DOS.  Once enqueued, CED will call a routine
  2019.             that you specify whenever the user types the new command (at the
  2020.             DOS prompt, or in a "participating" program).
  2021.  
  2022.             Access to CED service is provided via a bogus DOS function,
  2023.             0FFH.  This function behaves as a normal DOS function; that is,
  2024.             you must set up the registers as needed by the call, place a 0FFH
  2025.             in register AH, and execute an INT 21H.  The two subfunctions are
  2026.             described below; the subfunction code is placed in register AL.
  2027.  
  2028.  
  2029.             SUBFUNCTION 0: ENQUEUE
  2030.  
  2031.             This subfunction allows you to enqueue a new command.  Input
  2032.             register use is as follows:
  2033.  
  2034.                  AH = 0FFH (CED service)
  2035.  
  2036.                  AL = 0 (ENQUEUE)
  2037.  
  2038.                  BL = MODE
  2039.                       This is a bit flag that tells CED when to call your
  2040.                       routine.  You have the option of being called if your
  2041.                       command is typed at the DOS prompt, at a user program
  2042.                       prompt, or both.  Bit 0, if set, specifies that you are
  2043.                       to be called at the DOS prompt; Bit 1, if set,
  2044.                       specifies that you are to be called at a user program
  2045.                       prompt.
  2046.  
  2047.                  DS:SI = command name
  2048.                       This is a dword pointer to your command (i.e., you are
  2049.                       to be called when the user types this string).  The
  2050.                       command must be from one to eight characters,
  2051.                       terminated by a carriage return.  CED is not case
  2052.                       sensitive.
  2053.  
  2054.                  ES:DI = command processor entry point
  2055.                       This is a dword pointer to the routine that is to be
  2056.                       executed when the new command is entered.
  2057.  
  2058.  
  2059.             SUBFUNCTION 1: DEQUEUE
  2060.  
  2061.             This subfunction allows you to dequeue a user command; after a
  2062.             command has been dequeued, CED will no longer call you if the
  2063.             user types your command.  Input register use is:
  2064.  
  2065.  
  2066.                                 CED 1.0 User's Guide - 32
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.                  AH = 0FFH (CED service)
  2073.  
  2074.                  AL = 1 (DEQUEUE)
  2075.  
  2076.                  DS:SI = command name
  2077.                       A dword pointer to the name of the command to be
  2078.                       dequeued (i.e., the same DS:SI as was used to enqueue
  2079.                       the command).
  2080.  
  2081.  
  2082.             RETURN REGISTERS
  2083.  
  2084.             On return from CED service (DOS function 0FFH), all registers are
  2085.             preserved except AX.  The carry flag, if set, indicates that an
  2086.             error occurred; AX has the error code, which will be one of:
  2087.  
  2088.                  1:   Invalid function.  At present, only subfunctions 0 and
  2089.                       1 are supported.  Subfunction 2 is reserved.
  2090.  
  2091.                  2:   Command not found (DEQUEUE only).
  2092.  
  2093.                  8:   Insufficient memory (ENQUEUE only).
  2094.  
  2095.                  13:  Invalid data. (ENQUEUE only; bad MODE flag, or invalid
  2096.                       command length).
  2097.  
  2098.             NOTE: In current versions of DOS, AH returns 0FFH if function
  2099.             0FFH is requested and CED is not installed.  You may use the
  2100.             reserved subfunction (2), at your own risk, to test for CED
  2101.             installation.  If AH returns any value other than 0FFH, CED is
  2102.             probably installed.
  2103.  
  2104.  
  2105.             COMMAND PROCESSOR
  2106.  
  2107.             Your command processor is entered via a far call from CED.  Entry
  2108.             registers are as follows:
  2109.  
  2110.                  BL = MODE
  2111.                       This is the same bit flag as is used in the ENQUEUE
  2112.                       subfunction.  You may use it to test "where you are".
  2113.  
  2114.                  CL = MAXLEN
  2115.                       This is the maximum allowed length of the user input
  2116.                       string (i.e., the value of byte 0 of the DOS function
  2117.                       0AH input buffer) less one.
  2118.  
  2119.                  DS:DX = Command tail pointer
  2120.                       This is a dword pointer to the command tail of the
  2121.                       user's input.  For example, if your command is "hello"
  2122.                       and the user types "hello sam", DS:DX will point to the
  2123.                       space after "hello".
  2124.  
  2125.                  DS:DI = Command pointer
  2126.  
  2127.  
  2128.                                 CED 1.0 User's Guide - 33
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.                       This is a dword pointer to the first byte of the actual
  2135.                       user input.
  2136.  
  2137.             Note that DS:DI and DS:DX point to buffer space within CED, not
  2138.             to the actual DOS function 0AH input buffer.  There are no length
  2139.             attribute bytes preceding the buffer; DS:SI points to the first
  2140.             byte of the buffer, not the third.  CED will copy the final
  2141.             buffer, after all processing, to the actual input buffer.
  2142.  
  2143.             You may manipulate the buffer to your heart's content.  It is 255
  2144.             characters long, but CED will truncate the string if necessary
  2145.             (if the final command is longer than the maximum allowed by the
  2146.             function 0AH request).  In particular, note two things about the
  2147.             CED buffer:
  2148.  
  2149.                  1.   The string MUST be terminated by a carriage return
  2150.                       ASCII 13).
  2151.  
  2152.                  2.   If you null out the buffer (by putting a carriage
  2153.                       return in relative byte 0) CED will return a null
  2154.                       string to DOS or the user program.  This is probably
  2155.                       what you will want to do.
  2156.  
  2157.             There are few restrictions on what you can do within your service
  2158.             routine.  You may request other DOS service (EXCEPTION: do not
  2159.             request more buffered input via function 0AH!!), and you need not
  2160.             preserve any registers except SS:SP.  The stack in effect on
  2161.             entry will have about 200 bytes free; switch to a larger internal
  2162.             stack if necessary.
  2163.  
  2164.             Return to CED via a far RET.
  2165.  
  2166.             Appendix H contains a sample assembler program to enqueue a
  2167.             trivial command.
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.                                 CED 1.0 User's Guide - 34
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.                               Appendix H: User Command Demo
  2197.                               -----------------------------
  2198.  
  2199.             Comment *
  2200.  
  2201.                  userdemo.com - demo of CED user command enqueuing
  2202.  
  2203.                  Assembly: MASM userdemo;
  2204.                            LINK userdemo;   (ignore NO STACK message)
  2205.                            EXE2BIN userdemo userdemo.com
  2206.  
  2207.                  Use:      Just type 'userdemo'.  You now have
  2208.                            a new DOS command, "hello"
  2209.  
  2210.                  Author:   CJDunford
  2211.                            05/28/85
  2212.  
  2213.             *
  2214.  
  2215.             CED       equ 0FFH            ; Special "DOS" fn for CED service
  2216.  
  2217.             ENQUEUE   equ 0               ; Subfunction: enqueue
  2218.             DEQUEUE   equ 1               ; Subfunction: dequeue
  2219.  
  2220.             DOS       equ 1               ; Cmd to be active at DOS prompt
  2221.             USER      equ 2               ; Cmd to be active at user prompt
  2222.  
  2223.             CR        equ 13
  2224.             LF        equ 10
  2225.  
  2226.             code segment
  2227.             assume cs:code,ds:code
  2228.             org 100H
  2229.             main proc far
  2230.                  jmp short Install        ; Go to installation
  2231.  
  2232.             ; -----------------------------------------------------
  2233.             ; This is the command processor.  It will be called
  2234.             ; whenever the user types "hello" at the DOS prompt.
  2235.             ; The routine simply prints the string "Hi there, ace".
  2236.             ;
  2237.             ; On entry:
  2238.             ;    BL: mode flag
  2239.             ;       1 = at DOS prompt
  2240.             ;       2 = at user program prompt
  2241.             ;    CL: max length of input
  2242.             ;    DS:SI => user command
  2243.             ;    DS:DX => user command tail
  2244.             ;
  2245.             ; Remember to null out the user string so that
  2246.             ; it is not passed on to DOS, then exit via a far
  2247.             ; return to CED.  Not necessary to preserve any
  2248.             ; registers.
  2249.             ; ------------------------------------------------------
  2250.  
  2251.  
  2252.                                 CED 1.0 User's Guide - 35
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.             Hello proc far                ; Must be a far procedure
  2259.                  mov byte ptr [si],CR     ; Null out the user's input
  2260.  
  2261.                  mov ax,cs                ; Set up local addressing
  2262.                  mov ds,ax
  2263.  
  2264.                  mov dx,offset HiThere$   ; Display our message
  2265.                  mov ah,9
  2266.                  int 21H
  2267.  
  2268.                  ret                      ; No need to restore any regs
  2269.             Hello endp
  2270.  
  2271.             HiThere$ db 'Hi there, ace',CR,LF,'$'   ; Message to be displayed
  2272.  
  2273.  
  2274.             ; -----------------------------------------------
  2275.             ; This is the installation routine.  It sets up
  2276.             ; the regs for a call to the CED command enqueuing
  2277.             ; service, enqueues the command, and terminates,
  2278.             ; leaving the command service routine resident
  2279.             ; ------------------------------------------------
  2280.             Install:
  2281.                  mov ah,CED               ; CED service request
  2282.                  mov al,ENQUEUE           ; Enqueue a new command
  2283.                  mov bl,DOS               ; To be active at DOS prompt
  2284.                  mov si,offset Hello$     ; DS:SI => command ("Hello")
  2285.                  mov di,offset Hello      ; ES:DI => service routine
  2286.                  int 21H                  ; Enqueue new command
  2287.                  jnc OK                   ; No carry, no error
  2288.  
  2289.                  mov dx,offset Error$     ; Only 1 error possible here
  2290.                  mov ah,9                 ; Print string
  2291.                  int 21H
  2292.                  int 20H                  ; Return to DOS
  2293.  
  2294.             OK:
  2295.                  mov dx,offset Install    ; OK: terminate/resident
  2296.                  int 27H
  2297.             main endp
  2298.  
  2299.             Hello$    db 'hello',CR        ; New command
  2300.             Error$    db 'CED user command list full',CR,LF,'$'
  2301.  
  2302.             code ends
  2303.             end main
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.                                 CED 1.0 User's Guide - 36
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.                                 COPYRIGHT/LICENSE/WARRANTY
  2321.                                 --------------------------
  2322.  
  2323.             This document and the program file CED.COM ("the software") are
  2324.  
  2325.                               Copyright (C) 1985, 1986, 1991
  2326.                                  The Cove Software Group
  2327.                                    Post Office Box 1072
  2328.                                     Columbia, MD 21044
  2329.                                    All Rights Reserved
  2330.  
  2331.             The copyright owner hereby licenses you to: use the software
  2332.             except as below; make as many copies of the program and
  2333.             documentation as you wish; give such copies to anyone; and
  2334.             distribute the software and documentation via electronic means.
  2335.             There is no charge for any of the above.
  2336.  
  2337.             You are specifically prohibited from charging, or requesting
  2338.             donations, for any such copies, however made; and from
  2339.             distributing the software and/or documentation with commercial
  2340.             products without prior permission in writing from the copyright
  2341.             owner.
  2342.  
  2343.             Persons and organizations who are engaged in the distribution of
  2344.             shareware, "freeware", and/or public domain software may include
  2345.             CED on distribution disks as long as charges are made on a per-
  2346.             disk basis rather than a per-program basis.  The charge per disk
  2347.             may not exceed $7 US.  Such persons and organizations must not
  2348.             represent themselves as vendors, distributors, or sellers of CED.
  2349.  
  2350.             CED may not be used in a commercial, governmental, or
  2351.             institutional environment.  It is intended for personal use only.
  2352.             The commercial program PCED is available for other users.
  2353.  
  2354.             No copy of the software may be distributed without this document;
  2355.             and the contents of the document must not be altered.
  2356.  
  2357.             There is no warranty of any kind, and the copyright owner is not
  2358.             liable for damages of any kind.  By using this free software,
  2359.             you agree to this.
  2360.  
  2361.                                ---------------------------
  2362.  
  2363.             IBM is a registered trademark of IBM Corp.
  2364.             MS-DOS is a trademark of Microsoft Corporation.
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.                                 CED 1.0 User's Guide - 37
  2376.  
  2377.